<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>注册</title>
    <link rel="stylesheet" href="__CSS__/supplies/bootstrap.min.css">
    <link rel="stylesheet" href="__CSS__/supplies/common.css">
    <link rel="stylesheet" href="__CSS__/supplies/register.css">
    <style>
        img{
            max-width:120px;_width:expression(this.width > 120 ? "120px" : this.width);
        }
        .select_a{
            text-decoration: none;
            border:1px solid #BDBDBD;
            display: block;
            width: 160px;
            height: 44px;
            text-align: center;
            color: white;
            out-line: none;
        }
        .select_a:hover{
            text-decoration: none;
            color: white;
            background-color: #BDBDBD;
        }
        .select_a:visited{
            text-decoration: none;
            color: white;
        }
        .select_a:active{
            text-decoration: none;
            color: white;
        }
        a:focus{
            text-decoration: none;
            color:#000;
        }
        .is{width:20px;height:20px;}
        .placeholder{
            width: 260px;
        }
    </style>
</head>
<body>
<div class="reg_container">
    <div class="reg_content form-inline">
        <div class="reg_left_from form-group">
            <div class="form_title" style="font-size: 24px;line-height: 24px;color: #FF690D;">
                注册</br><span class="font_size_16">registered</span>
            </div>
            <div class="form_content">
                <div class="user_name input_div">
                    <div class="placeholder font_size_14">手机号<br/><span class="font_size_11">Phone number</span></div>
                    <input type="text" class="tel input_placeholder" isvalid="yes" checkexpession="NotNull" errormsg="手机号不能为空<br/>Cell phone number can not be empty"/>
                </div>
                <div class="code form-inline input_div">
                    <div class="placeholder font_size_14" style="width: 160px;">验证码<br/><span class="font_size_11">Verificotion code</span></div>
                    <input type="text" class="form-group smscode input_placeholder" style="width: 160px;" isvalid="yes" checkexpession="NotNull" errormsg="验证码<br/>The verifying code cannot be empty"/>
                    <a class="form-group select_a get_code font_size_14" style="width: 96px;background: -webkit-gradient(linear, 0 0, 0 100%, from(#fff), to(#fff));;border: 1px solid #FF6A10;color: #FF6A10;">获取验证码</br><span class="font_size_13">get the verify</span></a>
                </div>
                <div class="input_div">
                    <div class="placeholder font_size_14">密码<br/><span class="font_size_11">Password</span></div>
                    <input type="password" class="password input_placeholder" isvalid="yes" checkexpession="NotNull" errormsg="密码<br/>The password can not be empty"/>
                </div>
                <div class="agreement form-inline input_div" style="font-size: 12px;">
                    <input type="checkbox" value="1" class="is"/>
                    <div class="agreement_remark form-group">阅读并接受《用户协议》</br><span style="color: #666666;">Reod and occept "User Agreement"</span></div>
                </div>
            </div>
            <div class="commint_btn">
                <a class="select_a btn_color_right font_size_14" style="cursor:pointer;">注册</br><span class="font_size_11">registered</span></a>
            </div>
            <div class="login_remark" style="font-size: 12px;">
                <a href="login.html">已有账号 ,<span style="color: #FF690D">去登陆</span></br><span style="color: #666666;">Alreody have on occount,to log in</span></a>
            </div>
        </div>
        <div class="fg form-group"></div>
        <div class="reg_register_remark form-group">
            <div class="app_code">
                <img src="/image/supplies/banner/4CDF0298677FDAB415FAFAB2DF587597.png">
            </div>
            <div class="remark font_size_14">
                <div class="">
                    下载手机客户端</br><span class="font_size_11" style="color: #666666;">Download mobile client</span>
                </div>
                <div>

                   <span > 随时随地管理你的店铺 </span><br>
                    <span class="color-6">Manage your store anytime,anywhere</span>
                </div>

            </div>
            <div class="download_btn">
                <a class="select_a btn_color_right font_size_14">立即下载</br><span class="font_size_11">download immediotely</span></a>
            </div>
        </div>
    </div>
</div>
</body>
<script src="/js/jquery-3.2.1.min.js"></script>
<script rel="script" src="/js/supplies/validator/validator.js"></script>
<script rel="script" src="/js/supplies/common_input.js"></script>
<script>
    $(".input_cont_box").click(function () {
        $(this).find(".input_title").hide();
        $(this).find("input").focus();
    });
    $("input[type = 'text']").blur(function () {
        if($(this).val() == ""){
            $(this).next().show();
        }else {

            $(this).next().hide();
        }
    })
    $("input[type = 'password']").blur(function () {
        if($(this).val() == ""){
            $(this).next().show();
        }else {
            $(this).next().hide();
        }
    })
    //获取验证码
    $('.get_code').click(function(){
        $tel =  $('.tel').val();
        $.ajax({
            type: "get",
            url: "__APP__/apishop/index/getMsgCode",
            cache: false,
            data: {tel: $tel,tag:'register'},
            dataType: "json",
            success: function (data) {

            }
        });
    })
    //提交
    $('.commint_btn').click(function(){
        $tel =  $('.tel').val();
        $password =  $('.password').val();
        $code =  $('.smscode').val();
        $is =  $('.is').val();
        if('' == $tel){
            confirm('注册号码不能为空');
        }else if('' == $password){
            confirm('密码不能为空');
        }else if(5>=$password.length || 17<=$password.length){
            confirm('请输入6-16位密码');
        }else if('' == $code){
            confirm('验证码不能为空');
        }else{
            $.ajax({
                type: "get",
                url: "__APP__/apishop/apishop/register",
                cache: false,
                data: {tel: $tel, pwd: $password, code: $code, is: $is},
                dataType: "json",
                success: function (data) {
                    //console.log(data);
                    if (200 == data['status']) {
                        location.href = "__APP__/supplies/index/authenticationInfo";
                    }else{
                        confirm(data['msg']);
                    }
                }
            });
        }
    })
</script>
<script>

</script>
</html>